//
//  UIButton+Helper.m
//  Btpin
//
//  Created by Vic on 2019/3/10.
//  Copyright © 2019 Vic. All rights reserved.
//

#import "UIButton+Helper.h"

@implementation UIButton (Helper)

- (NSInteger)section {
    return [objc_getAssociatedObject(self, _cmd) integerValue];
}
- (void)setSection:(NSInteger)section {
    objc_setAssociatedObject(self, @selector(section), @(section), OBJC_ASSOCIATION_RETAIN);
}
- (NSInteger)row {
    return [objc_getAssociatedObject(self, _cmd) integerValue];
}
- (void)setRow:(NSInteger)row {
    objc_setAssociatedObject(self, @selector(row), @(row), OBJC_ASSOCIATION_RETAIN);
}

- (NSIndexPath *)indexPath {
    return objc_getAssociatedObject(self, @selector(indexPath));
}
- (void)setIndexPath:(NSIndexPath *)indexPath {
    objc_setAssociatedObject(self, @selector(indexPath), indexPath, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}

@end
